<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>ajax</title>
</head>
<body>

    <!-- 利用 form表单 post请求 -->
    <form action="postParameter" method="post">
        <input type="text" name="studentId">
        <input type="text" name="classId">
        <input type="submit" value="提交">
    </form>


<!-- 使用这个页面来构造 ajax 请求 -->
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.min.js"></script>

    <script>
        // $.ajax({
        //     // 这个地方注意是 单引号
        //     type: 'post' ,
        //     url: 'method',
        //     contentType: "application/x-www-form-urlencoded; charset=UTF-8",
        //     success: function(body,status) {
        //          console.log(body);
        //     }
        // }); 
    </script>

    
</body>
</html>